<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2023/9/26
  Time: 16:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }

        .container {
            width: 300px;
            margin: 0 auto;
        }

        .form-group {
            margin-bottom: 10px;
        }

        .form-group label {
            display: block;
        }

        .form-group input {
            width: 100%;
            padding: 5px;
        }

        .form-group .btn {
            padding: 8px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            cursor: pointer;
        }

        .form-group .btn:hover {
            background-color: #0056b3;
        }

        .form-group .message {
            color: red;
            font-size: 14px;
            margin-top: 10px;
        }
    </style>
</head>
<body>
<div class="container">
    <% String phone = request.getParameter("telephone");%>
    <h1>修改密码</h1>
    <p style="color: red;" id="msg"></p>
    <form id="passwordForm" action="UpPhoneServlet" method="post">
        <input type="hidden" name="phone" value="<%=phone%>">
        <div class="form-group">
            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required>
        </div>
        <div class="form-group">
            <label for="confirmPassword">确认密码：</label>
            <input type="password" id="confirmPassword" name="confirmPassword" required>
        </div>
        <div class="form-group">
            <button type="submit" class="btn">提交</button>
        </div>

    </form>
</div>
</body>
<script src="js/jquery.js"></script>
<script>
    $("#confirmPassword").blur(function () {
        var password=$("#password").val();
        var confirmPassword=$("#confirmPassword").val();
        if (password==confirmPassword){

        }else {
            alert("密码不一致,请确认密码一致")
            return false;
        }
    })
</script>
</html>

